/*
 * Ext GWT 2.2.3 - Ext for GWT
 * Copyright(c) 2007-2010, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */
package hu.diploma.web.client;

import com.extjs.gxt.themes.client.Access;
import com.extjs.gxt.themes.client.Slate;
import com.extjs.gxt.ui.client.Style.LayoutRegion;
import com.extjs.gxt.ui.client.util.Margins;
import com.extjs.gxt.ui.client.util.ThemeManager;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class ContactManager implements EntryPoint {

	public void onModuleLoad() {
		ThemeManager.register(Slate.SLATE);
		ThemeManager.register(Access.ACCESS);
		Viewport viewport = new Viewport();
		viewport.setLayout(new BorderLayout());

		BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH, 100);

		northData.setMargins(new Margins(5, 5, 5, 5));

		BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 150);
		westData.setCollapsible(true);
		westData.setFloatable(true);
		westData.setMargins(new Margins(0, 5, 5, 5));

		BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);
		centerData.setMargins(new Margins(0, 5, 5, 0));
		centerData.setFloatable(true);

		viewport.add(WidgetFactory.getMenu(), westData);
		viewport.add(WidgetFactory.getCenterPanel(), centerData);
		viewport.add(WidgetFactory.getHeader(), northData);

		RootPanel.get().add(viewport);

	}

}
